package com.yupi.yuoj.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yupi.yuoj.model.dto.contentcomment.ContentCommentQueryRequest;
import com.yupi.yuoj.model.entity.ContentComment;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yupi.yuoj.model.vo.ContentCommentVO;

import javax.servlet.http.HttpServletRequest;

/**
* @author admin
* @description 针对表【content_comment(内容评论表)】的数据库操作Service
* @createDate 2025-11-01 21:28:52
*/
public interface ContentCommentService extends IService<ContentComment> {

    /**
     * 校验数据
     *
     * @param contentComment
     * @param add 对创建的数据进行校验
     */
    void validContentComment(ContentComment contentComment, boolean add);

    /**
     * 获取查询条件
     *
     * @param contentCommentQueryRequest
     * @return
     */
    QueryWrapper<ContentComment> getQueryWrapper(ContentCommentQueryRequest contentCommentQueryRequest);
    
    /**
     * 获取内容评论封装
     *
     * @param contentComment
     * @param request
     * @return
     */
    ContentCommentVO getContentCommentVO(ContentComment contentComment, HttpServletRequest request);

    /**
     * 分页获取内容评论封装
     *
     * @param contentCommentPage
     * @param request
     * @return
     */
    Page<ContentCommentVO> getContentCommentVOPage(Page<ContentComment> contentCommentPage, HttpServletRequest request);

}
